package com.smartboard.network.client;

import com.smartboard.network.game.IPlayGame;
import com.smartboard.network.game.IRoom;
import com.smartboard.network.game.IUser;

import java.util.List;

/**
 * Created by cheas on 2018/8/16.
 */
public interface GameEventListener {
    public void onUserLogin(IUser user);
    public void onUserLogout(IUser user);
    public void onUserInfoChange(IUser user);
    public void onRoomNumChanged(List<IRoom> rooms);
    public void onGameNumChanged(IRoom room);
    public void onRoomUserChanged(IRoom room, IUser user, boolean leave);
    public void onGameUserChanged(IPlayGame game, IUser user, boolean leave);
    public void onGameStateChanged(IPlayGame game);
    public void onPlayMove(IUser user, IPlayGame game, String move);
    public void onUndo(IUser user, IPlayGame game);
    public void onResign(IUser user, IPlayGame game);
    public void onDraw(IUser user, IPlayGame game);
    public void onReady(IUser user, IPlayGame game);
    public void onGameStart(IPlayGame game);
    public void onGameOver(IPlayGame game);
    public void onMessage(IUser user, IRoom room, IPlayGame game, IUser toUser, String msg);
    public void onRespError(int cmd, int errorCode);
}
